#include "stdafx.h"
#include "development-tool.h"
#include"run.h"

namespace devtool
{

}

void devtool::Display()
{
	show_NowInfo();
}

void devtool::show_NowInfo()
{
	using GlobalSet::window;

	if (window.crPos.X > window.w1 && window.crPos.X < window.width - window.w2 && window.crPos.Y > window.h1 &&window.crPos.Y < window.height - window.h3)
	{
		string show = "pos(" + to_string(window.crPos.X - window.w1) + "," + to_string(window.crPos.Y - window.h1) + ")";
		int k = 12 - show.length();
		while (k--) show += ' ';
		Print(show, 1 + CELLWIDTH * 37, GlobalSet::window.height - GlobalSet::window.h3 + 2, F_red | F_inten);
	};
	Print((int)GlobalSet::duration, 1 + CELLWIDTH * 50, GlobalSet::window.height - GlobalSet::window.h3 + 2, F_green | F_inten);
}

void devtool::show_BasicInfo()
{
	PCONSOLE_SCREEN_BUFFER_INFO info = new CONSOLE_SCREEN_BUFFER_INFO;
	GetConsoleScreenBufferInfo(hOut, info);
	COORD size;
	size = info->dwSize;
	Print("win-size:[" + to_string(GlobalSet::window.width) + "," + to_string(GlobalSet::window.height) + "]", 1 + CELLWIDTH * 18, GlobalSet::window.height - GlobalSet::window.h3 + 2);
	delete info;
	
}
